package oli.my.plug
{
	import flash.display.Graphics;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class Plug2Implement extends Sprite
	{
		public function Plug2Implement()
		{
			super();
			if(stage)
				drawSomething(null);
			else
				addEventListener(Event.ADDED_TO_STAGE, drawSomething, false, 0, true);
		}
		private function drawSomething(e:Event = null):void
		{
			trace("drawing Circle 4 !");
			
			var g:Graphics = this.graphics;
			g.beginFill(0,.7*Math.random());
			g.drawCircle(stage.stageWidth/2*Math.random(),stage.stageHeight/2*Math.random(),100);
			g.endFill();
		}
	}
}